*** OPEN LOG/OUTPUT FILE ***

log using "C:\Users\17062\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Final Dataset\Output\CROAs.JPART manuscript models.06-18-2022.smcl", replace





*** MODELING THE EFFECTS OF CENTRALIZED REPORTING ON THE HANDLING OF EMPLOYEE DISCRIMINATION CASES IN U.S. FEDERAL AGENCIES [KRAUSE & PARK] ***




**** ACCESS DATABASE ***

use "C:\Users\17062\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Final Dataset\CROAs.Krause&Park.06-08-2022.dta", replace





****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************







*** TESTING H1: EVALUATING THE TOTAL NUMBER OF REPORTED DISCRIMINATION CASES [EVENT COUNT OUTCOME EXPONENTIAL MODEL) ****  




****  ESTIMATE ENDOGENOUS TREATMENT EFFECTS MODELS ON AGGREGATE COUNTS OF REPORTED CASES OF DISCRIMINATION ///
****  [I.E., # SETTLEMENTS (INFORMAL) + # WITHDRAWN (INFORMAL) + # FORMAL COMPLAINT FILED DISCRIMINATION CASES] ****

** NOTE: ALL PRIVATE RESOLUTION CASES OCCUR ONLY AFTER TRADITIONAL COUNSELING OR ALTERNATIVE DISPUTE RESOLUTION COUNSELING HAS BEEN COMPLETED **


** ATE EFFECTS: with ATEs evaluated as proportion of POM cases [i.e., decentralized reporting cases/control group] **

eteffects (sumintextreport_count fairnessgsem ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count , exponential) ///
(direct_reporting lagsumintextreport_count fairnessgsem  ratio_fsup_msup ratio_minsup_nonmsup  lntotworkforce_count nonnested politicization_lb) if intrep_prop!=., vce(cluster a_id) aequations
estimates store H1ATE
*
estat endogenous






** ATET EFFECTS: with ATETs evaluated as proportion of POM cases [i.e., decentralized reporting cases/control group] **
** NOTE WITHOUT FULL SET OF ESTIMATES SINCE ALL MODEL ESTIMATES ARE IDENTICAL TO ATE REPORTED FULL MODEL **
 
eteffects (sumintextreport_count fairnessgsem ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count , exponential) ///
(direct_reporting lagsumintextreport_count fairnessgsem  ratio_fsup_msup ratio_minsup_nonmsup  lntotworkforce_count nonnested politicization_lb) if intrep_prop!=., vce(cluster a_id) atet
estimates store H1ATET
*

graph set window fontface "Century Schoolbook"
set scheme sj, permanently

coefplot (H1ATE, rename(r1vs0.direct_reporting="ATE") \ H1ATET, rename(r1vs0.direct_reporting="ATET")),ylabel(-50 (100) 400, angle(horizon)) yscale(range (-50 (100) 400)) bylabel(Total Caseloads) vertical yline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(n) ciopts(recast(rcap) lcolor(dkgreen)) nooffsets msize(medsmall) xlabel(, nolabels) mcolor(dkgreen) title("Figure 2A" "Total Number of Reported Discrimination", size(medlarge)) saving("Figure2A")
graph save "C:\Users\17062\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Final Dataset\Graphics\JPART\Figure2-1.gph", replace



 

****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************






*** TESTING H2: EVALUATING THE PROPORTION OF PRIVATE RESOLUTION CASES: TOTAL, SETTLEMENT ONLY, & WITHDRAWN ONLY [FRACTIONAL PROBIT OUTCOME MODEL) ****  





**** ESTIMATE ENDOGENOUS TREATMENT EFFECTS MODELS ON PROPORTION OF TOTAL PRIVATE RESOLUTION WITHIN AGENCY ///
**** [I.E., (# SETTLEMENTS + # WITHDRAWN) / (# SETTLEMENTS + # WITHDRAWN + # FORMAL COMPLAINTS FILED) DISCRIMINATION CASES] ****

** NOTE: ALL PRIVATE RESOLUTION CASES OCCUR ONLY AFTER TRADITIONAL COUNSELING OR ALTERNATIVE DISPUTE RESOLUTION COUNSELING HAS BEEN COMPLETED **




** ATE EFFECTS: with ATEs evaluated as proportion of POM cases [i.e., decentralized reporting cases/control group] **

eteffects (intrep_prop  fairnessgsem  ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count , fractional) ///
(direct_reporting lagintrep_prop fairnessgsem  ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count nonnested politicization_lb) if intrep_prop!=., vce(cluster a_id) aequations
estimates store H2ATE
* 
estat endogenous







** ATET EFFECTS: with ATETs evaluated as proportion of POM cases [i.e., decentralized reporting cases/control group] **
** NOTE WITHOUT FULL SET OF ESTIMATES SINCE ALL MODEL ESTIMATES ARE IDENTICAL TO ATE REPORTED FULL MODEL **
 
eteffects (intrep_prop  fairnessgsem ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count , fractional) ///
(direct_reporting lagintrep_prop fairnessgsem  ratio_fsup_msup ratio_minsup_nonmsup  lntotworkforce_count nonnested politicization_lb) if intrep_prop!=., vce(cluster a_id) atet
estimates store H2ATET
*

coefplot (H2ATE, rename(r1vs0.direct_reporting="H2 ATE") \ H2ATET, rename(r1vs0.direct_reporting="H2 ATET")),ylabel(-0.2 (0.2) 1, angle(horizon)) yscale(range (-0.2 (0.2) 1)) vertical yline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(n) ciopts(recast(rcap) lcolor(dknavy)) nooffsets msize(medsmall) xlabel(, nolabels) mcolor(dknavy) title("Figure 2B" "Informal Caseload Rate", size(medlarge)) saving ("Figure2B")
graph save "C:\Users\17062\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Final Dataset\Graphics\JPART\Figure2-2.gph", replace




****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************





**** TESTING H3.A:  ESTIMATE ENDOGENOUS TREATMENT EFFECTS MODELS ON PROPORTION OF WITHDRAWN PRIVATE RESOLUTIONS WITHIN AGENCY  ****
**** [I.E., (# WITHDRAWN) / (# SETTLEMENTS + # WITHDRAWN + # FORMAL COMPLAINTS FILED) DISCRIMINATION CASES] ****


** NOTE: ALL PRIVATE RESOLUTION CASES OCCUR ONLY AFTER TRADITIONAL COUNSELING OR ALTERNATIVE DISPUTE RESOLUTION COUNSELING HAS BEEN COMPLETED **




** ATE EFFECTS: with ATEs evaluated as proportion of POM cases [i.e., decentralized reporting cases/control group] **

eteffects (withdraw_prop  fairnessgsem ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count , fractional) ///
(direct_reporting lagwithdraw_prop fairnessgsem  ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count nonnested politicization_lb) if intrep_prop!=., vce(cluster a_id) aequations
estimates store H3aATE
*
estat endogenous






** ATET EFFECTS: with ATETs evaluated as proportion of POM cases [i.e., decentralized reporting cases/control group] **
** NOTE WITHOUT FULL SET OF ESTIMATES SINCE ALL MODEL ESTIMATES ARE IDENTICAL TO ATE REPORTED FULL MODEL **
 
eteffects (withdraw_prop  fairnessgsem  ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count , fractional) ///
(direct_reporting lagwithdraw_prop fairnessgsem  ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count nonnested politicization_lb) if intrep_prop!=., vce(cluster a_id) atet
estimates store H3aATET
*

coefplot (H3aATE, rename(r1vs0.direct_reporting="H3a ATE") \ H3aATET, rename(r1vs0.direct_reporting="H3a ATET")),ylabel(-0.2 (0.2) 1, angle(horizon)) yscale(range (-0.2 (0.2) 1)) vertical yline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(n) ciopts(recast(rcap) lcolor(dkorange)) nooffsets msize(medsmall) xlabel(, nolabels) mcolor(dkorange) title("Figure 2C" "Withdrawn Caseload Rate", size(medlarge)) saving ("Figure2C")
graph save "C:\Users\17062\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Final Dataset\Graphics\JPART\Figure2-3.gph", replace



 
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************





**** TESTING H3.B: ESTIMATE ENDOGENOUS TREATMENT EFFECTS MODELS ON PROPORTION OF SETTLEMENT PRIVATE RESOLUTIONS WITHIN AGENCY  ****
**** [I.E., (# SETTLEMENTS) / (# SETTLEMENTS + # WITHDRAWN + # FORMAL COMPLAINTS FILED) DISCRIMINATION CASES] ****


** NOTE: ALL PRIVATE RESOLUTION CASES OCCUR ONLY AFTER TRADITIONAL COUNSELING OR ALTERNATIVE DISPUTE RESOLUTION COUNSELING HAS BEEN COMPLETED **





** ATE EFFECTS: with ATEs evaluated as proportion of POM cases [i.e., decentralized reporting cases/control group] **

eteffects (settle_prop  fairnessgsem ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count , fractional) ///
(direct_reporting lagsettle_prop fairnessgsem  ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count nonnested politicization_lb) if intrep_prop!=., vce(cluster a_id) aequations
estimates store H3bATE
*
estat endogenous





** ATET EFFECTS: with ATETs evaluated as proportion of POM cases [i.e., decentralized reporting cases/control group] **
** NOTE WITHOUT FULL SET OF ESTIMATES SINCE ALL MODEL ESTIMATES ARE IDENTICAL TO ATE REPORTED FULL MODEL **
 
eteffects (settle_prop  fairnessgsem ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count , fractional) ///
(direct_reporting lagsettle_prop fairnessgsem  ratio_fsup_msup ratio_minsup_nonmsup lntotworkforce_count nonnested politicization_lb) if intrep_prop!=., vce(cluster a_id) atet
estimates store H3bATET
*

coefplot (H3bATE, rename(r1vs0.direct_reporting="H3b ATE") \ H3bATET, rename(r1vs0.direct_reporting="H3b ATET")),ylabel(-0.2 (0.2) 1, angle(horizon)) yscale(range (-0.2 (0.2) 1)) bylabel(Internal Caseloads) vertical yline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(n) ciopts(recast(rcap) lcolor(cranberry)) nooffsets msize(medsmall) xlabel(, nolabels) mcolor(cranberry) title("Figure 2D" "Settlement Caseload Rate", size(medlarge)) saving("Figure2D")
graph save "C:\Users\17062\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Final Dataset\Graphics\JPART\Figure2-4.gph", replace


gr combine Figure2A.gph Figure2B.gph Figure2C.gph Figure2D.gph, note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall))



*********Figure 3 Graph *********
drop if intrep_prop==.
drop if lagsumintextreport_count==.

***** Preparing variables ******
generate directreporting=1 if direct_reporting==0
replace directreporting=2 if direct_reporting==1

generate of=1 if fairnessgsem < -0.0520733
replace of=2 if fairnessgsem >= -0.0520733 & fairnessgsem < 0.243207
replace of=3 if fairnessgsem >= 0.243207

graph bar (count) a_id, over(directreporting, relabel (1 "Non-CROA" 2 "CROA")) over(of, relabel(1 "Low OF" 2 "Moderate OF" 3 "High OF")) ytitle("") ylabel (0(50)150, labsize (small) angle(horizon)) blabel (total, position(outside) format (%9.0gc)) title ("Prevalence of CROAs and Non-CROAs") subtitle("by Organizational Fairness(OF)") bar(1, color(black*0.5))
graph save "C:\Users\17062\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Final Dataset\Graphics\JPART\Figure3.gph", replace



****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************



log close
